package TaskOne;

import java.awt.*;
import java.security.DigestException;

/**
 * 犬类
 */
public class Dogs extends Animal{
    /**
     * 狗
     */
    private String dog;
    /**
     * 狼
     */
    private String wolf;
    public Dogs(){

    }
    public Dogs(String dog,String wolf){
        this.dog=dog;
        this.wolf=wolf;
    }
    //调用父类
    public Dogs(int age,String color,String name){
        super(age,color,name);
    }
    public void output1(){
        System.out.println(dog+wolf+"都是犬类，它们都有"+this.getName()+"，和不同的"+getColor());

    }
    //访问修饰符
    public String getDog(){
        return dog;
    }
    //修改修饰符
    public void setDog(String dog){
        this.dog=dog;
    }
    public String getWolf(){
        return wolf;
    }
    public void setWolf(String wolf){
        this.wolf=wolf;
    }

    public static void main(String[]args){
        Dogs dogs=new Dogs();
        dogs.setDog("狗");
        dogs.setWolf("狼");
//
//     调用 父类
        dogs.setName("名字");
        dogs.setColor("颜色");



        dogs.output1();

    }




}


